<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="../../base.jsp"%>
<!DOCTYPE html>
<html>

<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>数据 - AdminLTE2定制版</title>
    <meta name="description" content="AdminLTE2定制版">
    <meta name="keywords" content="AdminLTE2定制版">
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- 页面meta /-->

    <%--分页--%>
    <%--<script>
        $(function () {
            $("#pageSize").change(function () {
                var pageSize = $("#pageSize").val();
                location.href="${pageContext.request.contextPath}/cargo/finance/toView.do?&page=1&size="+pageSize;
            })
        })

    </script>--%>

    <%--根据下拉选项进行分页--%>
    <%--<script>
        $(function () {
            //获取下拉选项的所有内容
            var pageSize = document.getElementById("pageSize");
            //获取传递回来的对象中存的size
            var value = "${page.pageSize}";
            /* alert(pageSize.options.length)*/
            //遍历数组
            for(var i=0; i<pageSize.options.length; i++){
                //如果下拉选项的标签体内容与对象中的size一致
                if(pageSize.options[i].text === value){
                    //添加selectd属性
                    pageSize.options[i].selected="selected";
                    break;
                }
            }
        })
    </script>--%>
</head>
<body>
<div id="frameContent" class="content-wrapper" style="margin-left:0px;">
    <!-- 内容头部 -->
    <section class="content-header">
        <h1>
            订单管理
            <small>订单表单</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="/home.do"><i class="fa fa-dashboard"></i> 首页</a></li>

            <li class="active">订单表单</li>
        </ol>
    </section>
    <!-- 内容头部 /-->

    <!-- 正文区域 -->
    <!-- 正文区域 -->
    <section class="content">

        <!--订单信息-->
        <div class="panel panel-default">
            <div class="panel-heading">查看财务</div>
            <%--enctype="multipart/form-data"--%>
            <form id="editForm" action="${ctx}/cargo/finance/edit.do" method="post">
                <input type="hidden" name="financeOrderId" value="${finance.financeId}">
                <%--<input type="hidden" name="invoiceId" value="${finance.invoiceId}" id="invoiceId">--%>
                <div class="row data-type" style="margin: 0px">

                    <%--<div class="col-md-2 title">制单日期</div>--%>
                    <%--<div class="col-md-4 data">--%>
                        <%--<input type="text" class="form-control" placeholder="制单日期"  name="inputDate" value="${finance.inputDate}">--%>
                    <%--</div>--%>
                    <div class="col-md-2 title">制单日期</div>
                    <div class="col-md-4 data">
                        <div class="input-group date">
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                            <input type="text" placeholder="制单日期"  name="inputDate" disabled="disabled" class="form-control"
                                   value="<fmt:formatDate value="${finance.inputDate}" pattern="yyyy-MM-dd"/>" id="inputDate">
                        </div>
                    </div>


                    <div class="col-md-2 title">发票金额</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="发票金额" disabled="disabled" name="invoicemoney" value="${finance.invoicemoney}">
                    </div>

                    <div class="col-md-2 title">装运港</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="装运港" disabled="disabled" name="portOfLoading" value="${finance.portOfLoading}">
                    </div>

                    <div class="col-md-2 title">卸货港</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="卸货港" disabled="disabled" name="portOfDischarge" value="${finance.portOfDischarge}">
                    </div>

                    <%--<div class="col-md-2 title">装货日期</div>--%>
                    <%--<div class="col-md-4 data">--%>
                        <%--<input type="text" class="form-control" placeholder="装货日期"  name="loadingDate" value="${finance.loadingDate}">--%>
                    <%--</div>--%>

                        <div class="col-md-2 title">装货日期</div>
                        <div class="col-md-4 data">
                            <div class="input-group date">
                                <div class="input-group-addon">
                                    <i class="fa fa-calendar"></i>
                                </div>
                                <input type="text" placeholder="装货日期"  disabled="disabled" name="loadingdate" class="form-control"
                                       value="<fmt:formatDate value="${finance.loadingdate}" pattern="yyyy-MM-dd"/>" id="loadingdate">
                            </div>
                        </div>

                    <%--<div class="col-md-2 title">有效日期</div>--%>
                    <%--<div class="col-md-4 data">--%>
                        <%--<input type="text" class="form-control" placeholder="有效日期"  name="limitDate" value="${finance.limitDate}">--%>
                    <%--</div>--%>

                        <div class="col-md-2 title">有效日期</div>
                        <div class="col-md-4 data">
                            <div class="input-group date">
                                <div class="input-group-addon">
                                    <i class="fa fa-calendar"></i>
                                </div>
                                <input type="text" placeholder="有效日期"   disabled="disabled" name="limitdate" class="form-control"
                                       value="<fmt:formatDate value="${finance.limitdate}" pattern="yyyy-MM-dd"/>" id="limitdate">
                            </div>
                        </div>

                    <%--<div class="col-md-2 title">贸易条款</div>--%>
                    <%--<div class="col-md-4 data">--%>
                        <%--<input type="text" class="form-control" placeholder="贸易条款" name="tradeTerms" value="${finance.tradeTerms}">--%>
                    <%--</div>--%>

                    <div class="col-md-2 title">份数</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="份数" disabled="disabled" name="copynum" value="${finance.copynum}">
                    </div>

                    <div class="col-md-2 title">运输方式</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="运输方式" disabled="disabled" name="ordertype" value="${finance.ordertype}">
                    </div>

                </div>
            </form>
        </div>

        <!--工具栏-->
        <div class="box-tools text-center">
            <%--<button type="button" onclick="go()" class="btn bg-maroon">保存</button>--%>
            <button type="button" class="btn btn-default" title="刷新" onclick="window.location.reload();"><i class="fa fa-refresh"></i> 刷新</button>
            <button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
        </div>
        <!--工具栏/-->
        <%--'document.getElementById("editForm").submit()'--%>
    </section>
    <!-- 正文区域 /-->

    <%--<section class="content">--%>

        <!-- .box-body -->
        <%--<div class="box box-primary">--%>
            <%--<div class="box-header with-border">
                <h3 class="box-title">财务列表</h3>
            </div>--%>

            <%--<div class="box-body">

                <!-- 数据表格 -->
                <div class="table-box">
                    <!--数据列表-->
                    <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
                        <thead>
                        <tr>
                            <td class="tableHeader"></td>
                            <td class="tableHeader">序号</td>
                            <td class="tableHeader">发票单号</td>
                            <td class="tableHeader">报运合同</td>
                            <td class="tableHeader">信用证</td>
                            <td class="tableHeader">货物总价</td>
                            <td class="tableHeader">运输费用</td>
                            <td class="tableHeader">贸易条款</td>
                            <td class="tableHeader">不含总金额</td>
                            <td class="tableHeader">含税总金额</td>
                            <td class="tableHeader">开票日期</td>
                            <td class="tableHeader">开票人</td>
                            <td class="tableHeader">审核人</td>
                            <td class="tableHeader">状态</td>
                        </tr>
                        </thead>
                        <tbody class="tableBody" >
                        <c:forEach items="${page.list}" var="o" varStatus="status">
                            <tr>
                                <td><input type="radio" name="ids" value="${o.invoiceId}"/></td>
                                <td>${status.index+1}</td>
                                <td>${o.invoiceId}</td>
                                <td>${o.scNo}</td>
                                <td>${o.blNo}</td>
                                <td>${o.exportProductPrice}</td>
                                <td>${o.freightPrice}</td>
                                <td>${o.tradeTerms}</td>
                                <td>${o.excludingTax}</td>
                                <td>${o.taxIncluded}</td>
                                <td><fmt:formatDate value="${o.invoiceDate}" pattern="yyyy-MM-dd"/></td>
                                <td>${o.drawer}</td>
                                <td>${o.auditor}</td>
                                <td><c:if test="${o.state==0}">草稿</c:if>
                                    <c:if test="${o.state==1}"><font color="green">已生成发票</font></c:if>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <!--数据列表/-->
                    <!--工具栏/-->
                </div>
                <!-- 数据表格 /-->
            </div>--%>
            <!-- /.box-body -->

            <!-- .box-footer-->
            <%--<div class="box-footer">
                <jsp:include page="../../common/page.jsp">
                    <jsp:param value="/cargo/finance/toView.do?" name="pageUrl"/>
                </jsp:include>
            </div>
            <!-- /.box-footer-->
        </div>--%>

    <%--</section>--%>
    <!-- 正文区域 /-->

</div>
<!-- 内容区域 /-->
</body>
<script src="../../plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="../../plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<link rel="stylesheet" href="../../css/style.css">
<script>
    $('#inputDate').datepicker({
        autoclose: true,
        format: 'yyyy-mm-dd'
    });
    $('#loadingdate').datepicker({
        autoclose: true,
        format: 'yyyy-mm-dd'
    });
    $('#limitdate').datepicker({
        autoclose: true,
        format: 'yyyy-mm-dd'
    });
</script>
</html>